package controller

import (
	"github.com/kataras/iris/v12"
	"net/http"
)

type IndexController struct {
}

func NewIndexController() *IndexController {
	return &IndexController{}
}

func (this *IndexController) Index(c iris.Context) {

	c.JSON(iris.Map{"code": http.StatusOK, "msg": "OK", "data": iris.Map{}})
}

func (this *IndexController) Show(c iris.Context) {
	c.Text("frans")
}

func (this *IndexController) Route(r iris.Party) {
	r.Any("/", this.Index)
	r.Any("/show", this.Show)
}
